import GameUiTools from "GameUiTools";
import GameConfig from "GameConfig";

cc.Class({
    extends: cc.Component,

    properties: {
        closeBtn: cc.Node,
        rankBox: cc.Node,
    },

    onLoad() {
        GameUiTools.setButtonClickEvents(this, this.closeBtn, "closeBtnFunc");
    },

    start () {
        if (CC_WECHATGAME) {
            wx.postMessage({
                messageType: 2, //获取排行榜
                MAIN_MENU_NUM: GameConfig.MAIN_MENU_NUM,
            });   
        } 
    },

    closeBtnFunc: function() {
        GameUiTools.unLoadingLayer(this.node);
    },
});